'use strict';
const db = uniCloud.database();
const dbCmd = db.command;
exports.main = async (event, context) => {
	let {name_key, coid_key,ps_key,mast_key,factor_key,ifactor_key} = event;
	let res = await db.collection("pollution").where({
		co_name:new RegExp(name_key,"ig"),
		id:coid_key,
		ps:ps_key,
		mast_id:new RegExp(mast_key,"ig"),
		factors:factor_key,
		identified_factors:ifactor_key
	}).orderBy("id","asc").get();
	return res;	
};
